package cn.johnyu.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.commons.dto.ProductDto;

import java.util.List;

@Mapper
public interface ProductMapper {
    @Select("select * from products")
    List<ProductDto> findAllProducts();

    @Select("select * from products where id=#{id}")
    ProductDto findProductById(int id);
}
